﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Xml.Linq;
using Microsoft.VisualStudio.Tools.Applications.Runtime;
using Office = Microsoft.Office.Core;
using Word = Microsoft.Office.Interop.Word;

namespace OfficeContacts
{
    public partial class ThisDocument
    {
        private void ThisDocument_Startup(object sender, System.EventArgs e)
        {
            ServiceReference1.Service1Client DataSvc =
                new ServiceReference1.Service1Client();

            this.openRecordsDataSet.Artists.Merge(DataSvc.GetArtists());

            DataSvc.Close();

            //rename actions panel
            ActionsPaneControl1 actionPane = new ActionsPaneControl1();
            AddArtistsActionsPane addArtistsActionPane = new AddArtistsActionsPane();

            //Globals.ThisDocument.

            this.ActionsPane.Controls.Add(actionPane);
            this.ActionsPane.Controls.Add(addArtistsActionPane);            
        }

        private void ThisDocument_Shutdown(object sender, System.EventArgs e)
        {
        }

        #region VSTO Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InternalStartup()
        {
            this.Shutdown += new System.EventHandler(this.ThisDocument_Shutdown);
            this.Startup += new System.EventHandler(this.ThisDocument_Startup);

        }

        #endregion
    }
}
